﻿#pragma once
#include "Vec.h"
#include "System/GameConfiguration.h"

struct FRect_Iterator
{
	friend class FRect;

	using pointer = FVec*; // or also value_type*
	using reference = FVec&; // or also value_type&

	public:
	FRect_Iterator(FRect& rect, int constructType);

	reference operator*();
	FRect_Iterator& operator++();

	friend bool operator==(const FRect_Iterator& a, const FRect_Iterator& b)
	{
		// UE_LOG(LogTD, Error, TEXT("Operator== %d %d,  %d %d"), a.x, a.y, b.x, b.y);
		return *a.m_Ptr == *b.m_Ptr;
	};

	friend bool operator!=(const FRect_Iterator& a, const FRect_Iterator& b)
	{
		// UE_LOG(LogTD, Error, TEXT("Operator!= %d %d,  %d %d"), a.x, a.y, b.x, b.y);
		return !(*a.m_Ptr == *b.m_Ptr);
	};


private:
	FRect* m_Rect; // Reference to the range for this iterator
	int x;
	int y;

	pointer m_Ptr;
};
